﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.DynamicGI
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using UnityEngine.Bindings;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Allows to control the dynamic Global Illumination.</para>
  /// </summary>
  [NativeHeader("Runtime/GI/DynamicGI.h")]
  public sealed class DynamicGI
  {
    /// <summary>
    ///         <para>Allows for scaling the contribution coming from real-time &amp; baked lightmaps.
    /// 
    /// Note: this value can be set in the Lighting Window UI and it is serialized, that is not the case for other properties in this class.</para>
    ///       </summary>
    public static extern float indirectScale { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    /// <summary>
    ///   <para>Determines the percentage change in lighting intensity that triggers Unity to recalculate the real-time lightmap.</para>
    /// </summary>
    public static extern float updateThreshold { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    /// <summary>
    ///   <para>The number of milliseconds that can be spent on material updates.</para>
    /// </summary>
    public static extern int materialUpdateTimeSlice { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    /// <summary>
    ///   <para>Allows to set an emissive color for a given renderer quickly, without the need to render the emissive input for the entire system.</para>
    /// </summary>
    /// <param name="renderer">The Renderer that should get a new color.</param>
    /// <param name="color">The emissive Color.</param>
    public static void SetEmissive(Renderer renderer, Color color)
    {
      DynamicGI.SetEmissive_Injected(renderer, ref color);
    }

    /// <summary>
    ///   <para>Allows overriding the distant environment lighting for Enlighten Realtime Global Illumination, without changing the Skybox Material.</para>
    /// </summary>
    /// <param name="input">Array of float values to be used for Enlighten Realtime Global Illumination environment lighting.</param>
    [NativeThrows]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern void SetEnvironmentData([NotNull("ArgumentNullException")] float[] input);

    /// <summary>
    ///   <para>When enabled, new dynamic Global Illumination output is shown in each frame.</para>
    /// </summary>
    public static extern bool synchronousMode { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    /// <summary>
    ///   <para>Is precomputed Enlighten Realtime Global Illumination output converged?</para>
    /// </summary>
    public static extern bool isConverged { [MethodImpl(MethodImplOptions.InternalCall)] get; }

    internal static extern int scheduledMaterialUpdatesCount { [MethodImpl(MethodImplOptions.InternalCall)] get; }

    internal static extern bool asyncMaterialUpdates { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    /// <summary>
    ///   <para>Schedules an update of the environment cubemap.</para>
    /// </summary>
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern void UpdateEnvironment();

    /// <summary>
    ///   <para>Schedules an update of the albedo and emissive textures of a system that contains the renderer or the terrain.</para>
    /// </summary>
    /// <param name="renderer">The Renderer to use when searching for a system to update.</param>
    /// <param name="terrain">The Terrain to use when searching for systems to update.</param>
    [Obsolete("DynamicGI.UpdateMaterials(Renderer) is deprecated; instead, use extension method from RendererExtensions: 'renderer.UpdateGIMaterials()' (UnityUpgradable).", true)]
    [EditorBrowsable(EditorBrowsableState.Never)]
    public static void UpdateMaterials(Renderer renderer)
    {
    }

    [EditorBrowsable(EditorBrowsableState.Never)]
    [Obsolete("DynamicGI.UpdateMaterials(Terrain) is deprecated; instead, use extension method from TerrainExtensions: 'terrain.UpdateGIMaterials()' (UnityUpgradable).", true)]
    public static void UpdateMaterials(Object renderer)
    {
    }

    [EditorBrowsable(EditorBrowsableState.Never)]
    [Obsolete("DynamicGI.UpdateMaterials(Terrain, int, int, int, int) is deprecated; instead, use extension method from TerrainExtensions: 'terrain.UpdateGIMaterials(x, y, width, height)' (UnityUpgradable).", true)]
    public static void UpdateMaterials(Object renderer, int x, int y, int width, int height)
    {
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern void SetEmissive_Injected(Renderer renderer, ref Color color);
  }
}
